<script src="<?php echo base_url();?>js/knockout-1.2.1.js"></script>
<p>&nbsp;</p>
<div align="center">
  <h1>Raw Material Inspection Report (Pulp Strength)</h1>
</div>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0" class="font">
  <tr>
    <td width="12%" height="30">Date</td>
    <td width="27%" height="30"> :    
    <input id="datepicker" data-bind="value: departure" /></td>
    <td width="18%" height="30">Pulp</td>
    <td width="43%" height="30"> :
      <select name="ticket" class="select" id="ticket3">
        <option value="NBKP">NBKP</option>
        <option value="LBKP1">LBKP1</option>
        <option value="LBKP2">LBKP2</option>
        <option value="Broke">Broke</option>
        <option value="Machine chest">Machine chest</option>
    </select></td>
  </tr>
  <tr>
    <td height="30">Time</td>
    <td height="30"> :    
    <input type="text" name="timepicker" id="timepicker" /></td>
    <td height="30">Brand</td>
    <td height="30"> :    
      <select name="ticket2" class="select" id="ticket4">
        <option value="PPPC">PPPC</option>
        <option value="Canfor">Canfor</option>
        <option value="Celgra">Celgra</option>
        <option value="Crestbrook">Crestbrook</option>
        <option value="Crofton">Crofton</option>
        <option value="Enopine">Enopine</option>
        <option value="Hinton">Hinton</option>
        <option value="Sodra">Sodra</option>
    </select></td>
  </tr>
  <tr>
    <td height="30">Type</td>
    <td height="30"> : 
      <select name="ticket5" class="select" id="ticket1">
        <option value="PPC PMW">PPC PMW</option>
        <option value="LPP">LPP</option>
        <option value="OSP PRO-NEW">OSP PRO-NEW</option>
    </select></td>
    <td height="30">Problem</td>
    <td height="30"> :    
    <input name="textfield21" type="text" class="k-textbox" id="textfield21"/></td>
  </tr>
  <tr>
    <td height="30">Gram</td>
    <td height="30"> : 
      <select name="ticket3" class="select" id="ticket2">
        <option value="60">60</option>
        <option value="64">64</option>
        <option value="70">70</option>
        <option value="75">75</option>
        <option value="80">80</option>
        <option value="90">90</option>
        <option value="100">100</option>
    </select></td>
    <td height="30">&nbsp;</td>
    <td height="30">&nbsp;</td>
  </tr>
</table>
<br />
<table width="60%" align="center">
<tr>
<td>
<div align="right">
<input name="Submit" type="submit" class="k-button" value="บันทึกข้อมูล"/>
&nbsp;
<input name="Reset" type="submit" class="k-button" value="ยกเลิก"/>
</div>
</td>
</tr>
</table>
<table width="60%" align="center" class="font">
  <tr>
    <td>
     <table id="grid">
                <thead>
                    <tr>
                        <th data-field="Properties">Properties Item</th>
                        <th data-field="Valuea">Value</th>
                        <th data-field="Valueb">Value</th>
                        <th data-field="Unit">Unit</th>
                    </tr>
                </thead>
                <tbody>
<tr>
<td>Furnish Machine</td><td><input name="ps11_1" type="number" class="k-textbox number" id="ps11_1" value="0"/></td>
<td><input name="ps11_2" type="number" class="k-textbox number" id="ps11_2" value="0"/></td>
<td>%</td>
</tr>
<tr>
<td>Consistency</td><td><input name="ps12_1" type="number" class="k-textbox number" id="ps12_1" value="0"/></td>
<td><input name="ps12_2" type="number" class="k-textbox number" id="ps12_2" value="0"/></td>
<td>%</td>
</tr>
<tr>
<td>Freeness,CSF</td><td><input name="ps13_1" type="number" class="k-textbox number" id="ps13_1" value="0"/></td>
<td><input name="ps13_2" type="number" class="k-textbox number" id="ps13_2" value="0"/></td>
<td>ml</td>
</tr>
<tr>
<td>Drainage Time</td><td><input name="ps14_1" type="number" class="k-textbox number" id="ps14_1" value="0"/></td>
<td><input name="ps14_2" type="number" class="k-textbox number" id="ps14_2" value="0"/></td>
<td>sec</td>
</tr>
<tr>
<td>Basis Weight (BD.) </td><td><input name="ps15_1" type="number" class="k-textbox number" id="ps15_1" value="0"/></td>
<td><input name="ps15_2" type="number" class="k-textbox number" id="ps15_2" value="0"/></td>
<td>gsm</td>
</tr>
<tr>
<td>Caliper</td><td><input name="ps16_1" type="number" class="k-textbox number" id="ps16_1" value="0"/></td>
<td><input name="ps16_2" type="number" class="k-textbox number" id="ps16_2" value="0"/></td>
<td>mm</td>
</tr>
<tr>
<td>Density</td><td><input type="number" class="k-textbox number" value="0"/></td>
<td><input name="ps17_2" type="number" class="k-textbox number" id="ps17_2" value="0"/></td>
<td>g/cm<sup>2</sup></td>
</tr>
<tr>
<td>Bulk</td><td><input name="ps18_1" type="number" class="k-textbox number" id="ps18_1" value="0"/></td>
<td><input name="ps18_2" type="number" class="k-textbox number" id="ps18_2" value="0"/></td>
<td>cm<sup>3</sup>/g</td>
</tr>
<tr>
<td>Tensile Index</td><td><input name="ps19_1" type="number" class="k-textbox number" id="ps19_1" value="0"/></td>
<td><input name="ps19_2" type="number" class="k-textbox number" id="ps19_2" value="0"/></td>
<td>N.m/g</td>
</tr>
<tr>
<td>Tear Index</td><td><input name="ps20_1" type="number" class="k-textbox number" id="ps20_1" value="0"/></td>
<td><input name="ps20_2" type="number" class="k-textbox number" id="ps20_2" value="0"/></td>
<td>mN.m<sup>2</sup>/g</td>
</tr>
<tr>
<td>Burst Index</td><td><input name="ps21_1" type="number" class="k-textbox number" id="ps21_1" value="0"/></td>
<td><input name="ps21_2" type="number" class="k-textbox number" id="ps21_2" value="0"/></td>
<td>kPa.m<sup>2</sup>/g</td>
</tr>
<tr>
<td>Bending Stiffness Index</td><td><input name="ps22_1" type="number" class="k-textbox number" id="ps22_1" value="0"/></td>
<td><input name="ps22_2" type="number" class="k-textbox number" id="ps22_2" value="0"/></td>
<td>mN/g</td>
</tr>
<tr>
<td>Folding</td><td><input name="ps23_1" type="number" class="k-textbox number" id="ps23_1" value="0"/></td>
<td><input name="ps23_2" type="number" class="k-textbox number" id="ps23_2" value="0"/></td>
<td>Times</td>
</tr>
<tr>
<td>L*</td><td><input name="ps24_1" type="number" class="k-textbox number" id="ps24_1" value="0"/></td>
<td><input name="ps24_2" type="number" class="k-textbox number" id="ps24_2" value="0"/></td>
<td>&nbsp;</td>
</tr>
<tr>
  <td>a*</td>
  <td><input name="ps25_1" type="number" class="k-textbox number" id="ps25_1" value="0"/></td>
  <td><input name="ps25_2" type="number" class="k-textbox number" id="ps25_2" value="0"/></td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td>b*</td>
  <td><input name="ps26_1" type="number" class="k-textbox number" id="ps26_1" value="0"/></td>
  <td><input name="ps26_2" type="number" class="k-textbox number" id="ps26_2" value="0"/></td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td>ISO Brightness</td>
  <td><input name="ps27_1" type="number" class="k-textbox number" id="ps27_1" value="0"/></td>
  <td><input name="ps27_2" type="number" class="k-textbox number" id="ps27_2" value="0"/></td>
  <td>%</td>
</tr>
<tr>
  <td>Opacity</td>
  <td><input name="ps28_1" type="number" class="k-textbox number" id="ps28_1" value="0"/></td>
  <td><input name="ps28_2" type="number" class="k-textbox number" id="ps28_2" value="0"/></td>
  <td>%</td>
</tr>
<tr>
  <td>Scattering Coeff.</td>
  <td><input name="ps29_1" type="number" class="k-textbox number" id="ps29_1" value="0"/></td>
  <td><input name="ps29_2" type="number" class="k-textbox number" id="ps29_2" value="0"/></td>
  <td>m<sup>2</sup>/kg</td>
</tr>
<tr>
  <td>Absorption Coeff.</td>
  <td><input name="ps30_1" type="number" class="k-textbox number" id="ps30_1" value="0"/></td>
  <td><input name="ps30_2" type="number" class="k-textbox number" id="ps30_2" value="0"/></td>
  <td>m<sup>2</sup>/kg</td>
</tr>
<tr>
  <td>CIE Whiteness</td>
  <td><input name="ps31_1" type="number" class="k-textbox number" id="ps31_1" value="0"/></td>
  <td><input name="ps31_2" type="number" class="k-textbox number" id="ps31_2" value="0"/></td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td>Porosity (Oil Gurley )</td>
  <td><input name="ps32_1" type="number" class="k-textbox number" id="ps32_1" value="0"/></td>
  <td><input name="ps32_2" type="number" class="k-textbox number" id="ps32_2" value="0"/></td>
  <td>sec / 100 ml</td>
</tr>
<tr>
  <td>Tensile stiffness index</td>
  <td><input name="ps33_1" type="number" class="k-textbox number" id="ps33_1" value="0"/></td>
  <td><input name="ps33_2" type="number" class="k-textbox number" id="ps33_2" value="0"/></td>
  <td>KN/Kg </td>
</tr>
<tr>
  <td>Ash</td>
  <td><input name="ps33_1" type="number" class="k-textbox number" id="ps33_1" value="0"/></td>
  <td><input name="ps33_2" type="number" class="k-textbox number" id="ps33_2" value="0"/></td>
  <td>%</td>
</tr>

                </tbody>
      </table>

            <script>
                $(document).ready(function() {
                    $("#grid").kendoGrid({
						columns: [
						{ field: "Properties", width: "125px" },
						{ field: "Valuea", width: "20px" },
						{ field: "Valueb", width: "20px" },
						{ field: "Unit",  width: "40px" }
						],
                        //height: 1000,
						//pageable: true,
						dataSource: {
						//pageSize: 12
						} 
                    });
                });
            </script>
    </td>
  </tr>
</table>

            <!--scrip list select-->
<script>
                $(document).ready(function() {
                    var viewModel = {
                        chosenTicket: ko.observable(),
                        resetTicket: function() { this.chosenTicket(null) },
                    };
                    $("#ticket1").kendoDropDownList().trigger("change");
                    $("#ticket2").kendoDropDownList().trigger("change");
                    $("#ticket3").kendoDropDownList().trigger("change");
                    $("#ticket4").kendoDropDownList().trigger("change");
                });
      		</script>
            <!--scrip วัน-เดือน-ปี-->
<script>
                $(document).ready(function() {
                    var today = new Date(),
                        birthdays = [
                           +new Date(today.getFullYear(), today.getMonth(), 11),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                           +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                           +new Date(today.getFullYear(), today.getMonth() - 2, 22)
                        ];

                    $("#datepicker").kendoDatePicker({
                        value: today,
                        month: {
                            // template for dates in month view
                            content: '# if ($.inArray(+data.date, [' + birthdays + ']) != -1) { #' +
                                         '<div class="birthday"></div>' +
                                     '# } #' +
                                     '#= data.value #'
                        },
                        footer: "Today - #=kendo.toString(data, 'd') #"
                    });

                    $("#datepicker").data("kendoDatePicker")
                                    .dateView.calendar.element
                                    .width(300);
                });
            </script>
            <!--scrip เวลา-->
<script>
                $(document).ready(function() {
                    // create TimePicker from input HTML element
                    $("#timepicker").kendoTimePicker();
                });
            </script>